import request from '@/utils/request'

export default class Social {
  static getArchivingCont(params: any) {
    return request({
      url: `/social_securitys/historys/${params.month}`,
      params
    })
  }

  static getArchivingList(data: any) {
    return request({
      url: `/social_securitys/historys/${data.year}/list`,
      data
    })
  }
  static newReport(data: any) {
    return request({
      url: `/social_securitys/historys/${data.yearMonth}/newReport`,
      method: 'put',
      data
    })
  }
  static getHistorysData(data: any) {
    return request({
      url: `/social_securitys/historys/archiveDetail/${data.userId}/${data.yearMonth}`,
      data
    })
  }
  static getArchivingExport(data: any) {
    return request({
      url: `/social_securitys/historys/${data.yearMonth}/export`,
      data
    })
  }
  static getArchivingFirst(data: any) {
    return request({
      url: `/social_securitys/historys/${data.yearMonth}/first`,
      data
    })
  }
  static getSocialList(data: any) {
    return request({
      url: '/social_securitys/list',
      method: 'post',
      data
    })
  }
  static getArchivingArchive(data: any) {
    return request({
      url: `/social_securitys/historys/${data.yearMonth}/archive`,
      method: 'post',
      data
    })
  }

  static getTips(yearMonth: any) {
    return request({
      url: `/social_securitys/tips/${yearMonth}`
    })
  }
  static saveContent(data: any) {
    return request({
      url: `/social_securitys/${data.userId}`,
      method: 'put',
      data
    })
  }
  static getContent(userId: any) {
    return request({
      url: `/social_securitys/${userId}`
    })
  }
  static getPaymentItemList(id: any) {
    return request({
      url: `/social_securitys/payment_item/${id}`
    })
  }
  static getSettings() {
    return request({
      url: '/social_securitys/settings'
    })
  }
  static saveSettings(data: any) {
    return request({
      url: '/social_securitys/settings',
      data,
      method: 'post'
    })
  }
}
